//
//  NSDate+TH.m
//  ZhuShou
//
//  Created by Dejun Liu on 15/10/4.
//  Copyright (c) 2015年 jw. All rights reserved.
//

#import "NSDate+TH.h"

@implementation NSDate (TH)

- (NSString *)th_dateTimeStringFromTHDateString:(NSString *)dateStr
{
    NSString *haomiao = [[dateStr removeString:@"/Date("]removeString:@")/"];
    double db = [haomiao doubleValue];
    double dbfloat = db/1000;
    NSDate *date = [NSDate dateWithTimeIntervalSince1970:dbfloat];
    NSString *datestirng = [date string];
    return datestirng;
}

- (NSString *)th_dateStringFromTHDateString:(NSString *)dateStr
{
    NSString *haomiao = [[dateStr removeString:@"/Date("]removeString:@")/"];
    double db = [haomiao doubleValue];
    double dbfloat = db/1000;
    NSDate *date = [NSDate dateWithTimeIntervalSince1970:dbfloat];
    NSString *datestirng = [date stringWithFormat:[NSDate dateFormatString]];
    return datestirng;
}

@end
